package com.briup.smartcity_group6.utils;

/**
 * 使用枚举类表示响应信息常用字符串和状态码
 */
public enum ResultCode {
    SUCCESS(1,"操作成功"),
    ERROR(2,"操作失败"),


    INTERNAL_ERROR(3, "系统内部错误，请联系管理员"),
    //login_passwd_error
    LOGIN_PASSWD_ERROR(10001,"密码错误"),
    //数据错误
    DATA_ERROR(20001,"数据错误");

    public static final String COMMENT_UNEXPECTED_STATUS = "评论处于一个我们不希望的状态";
    public static final String COMMENT_NOT_FOUND = "评论不存在";
    public static final String DLM = "至少应该保留一个!";
    public static final String SLM = "状态达到最小限制";
    public static final String DLE = "删除限制未启用";

    public static final String KEY_NOT_FOUND = "关键字不存在";

    public static final String Comment_Disappear = "评论已消失";

    //定义一个枚举对象表示具体的一个错误信息 用户不存在

    private Integer code;
    private String msg;

    ResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
